package com.wudgaby.study.jwtauth.config;

import com.wudgaby.study.jwtauth.servlet.AuthFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.servlet.DispatcherType;

@Configuration
@ServletComponentScan
public class ServletConfiguration {

    /*@Bean
    public FilterRegistrationBean filterRegistrationBean(AuthFilter authFilter){
        FilterRegistrationBean filter = new FilterRegistrationBean(authFilter);
        //优先级
        filter.setOrder(1);
        filter.setDispatcherTypes(DispatcherType.REQUEST);
        //匹配路径
        filter.addUrlPatterns("/*");
        return filter;
    }*/
}
